package cn.exrick.xboot.securityAdvisor.controllerImpl

import cn.exrick.xboot.base.dto.BreakRolesRecordDto
import cn.exrick.xboot.base.entity.JobAccidentCase
import cn.exrick.xboot.base.service.IJobAccidentCaseService
import cn.exrick.xboot.base.vo.JobAccidentCaseDetailVo
import cn.exrick.xboot.core.common.vo.PageVo
import cn.exrick.xboot.core.common.vo.Result
import cn.exrick.xboot.securityAdvisor.controller.ISecurityAdvisorController
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.RestController

@RestController
open class JobAccidentCaseController : ISecurityAdvisorController.IJobAccidentCase {

    @Autowired
    private lateinit var iJobAccidentCaseService: IJobAccidentCaseService

    override fun createOrUpdateJobAccidentCase(jobAccidentCase: JobAccidentCase): Result<Any?>? {

        return iJobAccidentCaseService.createOrUpdateJobAccidentCase(jobAccidentCase)
    }

    override fun removeJobAccidentCase(ids: Array<out String>): Result<Any?>? {

        return iJobAccidentCaseService.removeJobAccidentCase(ids)
    }

    override fun getJobAccidentCaseList(breakRolesRecordDto: BreakRolesRecordDto, pageVo: PageVo): Result<MutableMap<String, Any?>>? {

        return iJobAccidentCaseService.getJobAccidentCaseList(breakRolesRecordDto, pageVo)
    }

    override fun getJobAccidentCaseDetail(id: String?): Result<JobAccidentCaseDetailVo>? {

        return iJobAccidentCaseService.getJobAccidentCaseDetail(id)
    }

    override fun getJobAccidentCase(pageVo: PageVo): Result<MutableMap<String, Any?>>? {

        return iJobAccidentCaseService.getJobAccidentCase(pageVo)
    }

    override fun getJobAccidentByEnterpriseId(pageVo: PageVo, jobId: String, enterpriseId: String): Result<MutableMap<String, Any?>>? {

        return iJobAccidentCaseService.getJobAccidentByEnterpriseId(pageVo, jobId, enterpriseId)
    }
}